﻿Imports Microsoft.VisualBasic

Namespace effority.UserDirectory

    Public Class Utils

        Public Shared Function AnalyseClientAgent(ByVal AgentName As String) As Enums.ClientAgentType

            Dim result As Enums.ClientAgentType = Enums.ClientAgentType.Browser

            Dim tempStr As String = AgentName.ToLower

            If tempStr.Contains("bot") Then

                result = Enums.ClientAgentType.SearchBot

            End If

            If tempStr.Contains("spider") Then

                result = Enums.ClientAgentType.SearchBot

            End If

            If tempStr.Contains("crawl") Then

                result = Enums.ClientAgentType.SearchBot

            End If

            Return result

        End Function

    End Class

End Namespace
